/**
 * department module api
 */

import base from "./base";
import axios from "@/utils/axios";

const department = {
  getAllDepartment() {
    return axios.get(base.webBaseUrl + '/department/getall');
  },
  addToDepartment(params) {
    return axios.post(base.webBaseUrl + "/department_staff/add", null, {
      params:params
    });
  },
  deleteFromDepartment(params) {
    return axios.post(base.webBaseUrl + "/department_staff/delete", null, {
      params:params
    })
  },
  getManager(params) {
    return axios.post(base.webBaseUrl + "/department/getManager", null, {
      params:params
    });
  },
  deleteDepartment(params) {
    return axios.get(base.webBaseUrl + '/department/delete', {params:params});
  },
  addDepartment(params) {
    return axios.post(base.webBaseUrl + '/department/add', null, {
      params: params
    });
  },
  updateDepartment(params) {
    return axios.post(base.webBaseUrl + '/department/update', null, {
      params: params
    });
  }
}

export default department;
